#ifndef __EXTERNAL_API_H__
#define __EXTERNAL_API_H__
 
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
 
class ExternalAPIDispatch : public IDispatch
{
protected:
	ULONG			m_cRef;
 
public:
	FastDelegate2<int,int>										EnterRoom;
	FastDelegate2<CString,CString>								QQCertification;
	FastDelegate2<CString,CString>								SignupToGame;
	FastDelegate2<CString,CString>								CallSendSort;
	FastDelegate2<CString,CString>								CallCloseWebdlg;
	FastDelegate2<CString,CString>								CallOpenWebdlg;
	FastDelegate2<CString,CString>								CallMachineID;
	FastDelegate2<CString,CString>								CallShotBank;
	FastDelegate2<CString,CString>								RegUserInfo;
	FastDelegate2<CString,CString>								RegUserRestart;
	FastDelegate2<CString,CString>								RespGametoSignUp;
public:
	ExternalAPIDispatch();
	~ExternalAPIDispatch(void);
 
	STDMETHODIMP QueryInterface(REFIID, void**);
	STDMETHODIMP_(ULONG) AddRef(void);
	STDMETHODIMP_(ULONG) Release(void);
 
	//IDispatch
	STDMETHODIMP GetTypeInfoCount(UINT* pctinfo);
	STDMETHODIMP GetTypeInfo(
		/* [in] */ UINT iTInfo,
		/* [in] */ LCID lcid,
		/* [out] */ ITypeInfo** ppTInfo);
	STDMETHODIMP GetIDsOfNames(
		/* [in] */ REFIID riid,
		/* [size_is][in] */ LPOLESTR* rgszNames,
		/* [in] */ UINT cNames,
		/* [in] */ LCID lcid,
		/* [size_is][out] */ DISPID* rgDispId);
	STDMETHODIMP Invoke(
		/* [in] */ DISPID dispIdMember,
		/* [in] */ REFIID riid,
		/* [in] */ LCID lcid,
		/* [in] */ WORD wFlags,
		/* [out][in] */ DISPPARAMS* pDispParams,
		/* [out] */ VARIANT* pVarResult,
		/* [out] */ EXCEPINFO* pExcepInfo,
		/* [out] */ UINT* puArgErr);
};
 
#endif	//__EXTERNAL_API_H__
